import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView,
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/AboutView.vue'),
    // },
    {
      path: '/CeShu',
      name: 'CeShu',
      component: () => import('../views/module components/CeShu.vue'),
    },
    {
      path: '/',
      name: 'NewLoginView',
      component: () => import('../views/NewLoginView.vue'),
    },
    {
      path: '/LoginView',
      name: 'LoginView',
      component: () => import('../views/LoginView.vue'),
    },
    //菜单
    {
      path: '/MianView',
      name: 'MianView',
      children: [
        {
          path: '/UserCreateView',
          name: 'UserCreateView',
          component: () => import('../views/User/UserCreateView.vue'),
        },
        {
          path: '/UserList',
          name: 'UserList',
          component: () => import('../views/User/UserList.vue'),
        },
        {
          path: '/DquView',
          name: 'DquView',
          component: () => import('../views/User/DquView.vue'),
        },
        {
          path: '/UpdateUserView',
          name: 'UpdateUserView',
          component: () => import('../views/User/UpdateUserView.vue'),
        },
        //角色
        {
          path: '/AddRole',
          name: 'AddRole',
          component: () => import('../views/Role/AddRole.vue'),
        },
        {
          path: '/RoleList',
          name: 'RoleList',
          component: () => import('../views/Role/RoleList.vue'),
        },
        /////菜单
        {
          path: '/MenulistView',
          name: 'MenulistView',
          component: () => import('../views/Menu/MenulistView.vue'),
        },
        {
          path: '/UpdateMental',
          name: 'UpdateMental',
          component: () => import('../views/Menu/UpdateMental.vue'),
        },
        {
          path: '/AddMenuView',
          name: 'AddMenuView',
          component: () => import('../views/Menu/AddMenuView.vue'),
        },
        //角色分配菜单
        {
          path: '/AddRoleMenu',
          name: 'AddRoleMenu',
          component: () => import('../views/RoleMenu/AddRoleMenu.vue'),
        },
        //请假审批
        //添加请假申请表
        {
          path: '/AddLeaveModel',
          name: 'AddLeaveModel',
          component: () => import('../views/ApproveLevel/AddLeaveModel.vue'),
        },
        {
          path: '/ListLeaveModel',
          name: 'ListLeaveModel',
          component: () => import('../views/ApproveLevel/ListLeaveModel.vue'),
        },
        {
          path: '/UpdateLeaveModel',
          name: 'UpdateLeaveModel',
          component: () => import('../views/ApproveLevel/UpdateLeaveModel.vue'),
        },
        {
          path: '/AppLeaveModel',
          name: 'AppLeaveModel',
          component: () => import('../views/ApproveLevel/AppLeaveModel.vue'),
        },//显示详情
        {
          path: '/InLeaveModel',
          name: 'InLeaveModel',
          component: () => import('../views/ApproveLevel/InLeaveModel.vue'),
        },
      ],
      component: () => import('../views/MianView.vue'),
    },
  ],
})

export default router
